(library (glfw glfw)
  (export
    GLFW_VERSION_MAJOR
    GLFW_VERSION_MINOR
    GLFW_VERSION_REVISION
    GLFW_TRUE
    GLFW_FALSE
    GLFW_RELEASE
    GLFW_PRESS
    GLFW_REPEAT
    GLFW_HAT_CENTERED
    GLFW_HAT_UP
    GLFW_HAT_RIGHT
    GLFW_HAT_DOWN
    GLFW_HAT_LEFT
    GLFW_HAT_RIGHT_UP
    GLFW_HAT_RIGHT_DOWN
    GLFW_HAT_LEFT_UP
    GLFW_HAT_LEFT_DOWN
    GLFW_KEY_UNKNOWN
    GLFW_KEY_SPACE
    GLFW_KEY_APOSTROPHE
    GLFW_KEY_COMMA
    GLFW_KEY_MINUS
    GLFW_KEY_PERIOD
    GLFW_KEY_SLASH
    GLFW_KEY_0
    GLFW_KEY_1
    GLFW_KEY_2
    GLFW_KEY_3
    GLFW_KEY_4
    GLFW_KEY_5
    GLFW_KEY_6
    GLFW_KEY_7
    GLFW_KEY_8
    GLFW_KEY_9
    GLFW_KEY_SEMICOLON
    GLFW_KEY_EQUAL
    GLFW_KEY_A
    GLFW_KEY_B
    GLFW_KEY_C
    GLFW_KEY_D
    GLFW_KEY_E
    GLFW_KEY_F
    GLFW_KEY_G
    GLFW_KEY_H
    GLFW_KEY_I
    GLFW_KEY_J
    GLFW_KEY_K
    GLFW_KEY_L
    GLFW_KEY_M
    GLFW_KEY_N
    GLFW_KEY_O
    GLFW_KEY_P
    GLFW_KEY_Q
    GLFW_KEY_R
    GLFW_KEY_S
    GLFW_KEY_T
    GLFW_KEY_U
    GLFW_KEY_V
    GLFW_KEY_W
    GLFW_KEY_X
    GLFW_KEY_Y
    GLFW_KEY_Z
    GLFW_KEY_LEFT_BRACKET
    GLFW_KEY_BACKSLASH
    GLFW_KEY_RIGHT_BRACKET
    GLFW_KEY_GRAVE_ACCENT
    GLFW_KEY_WORLD_1
    GLFW_KEY_WORLD_2
    GLFW_KEY_ESCAPE
    GLFW_KEY_ENTER
    GLFW_KEY_TAB
    GLFW_KEY_BACKSPACE
    GLFW_KEY_INSERT
    GLFW_KEY_DELETE
    GLFW_KEY_RIGHT
    GLFW_KEY_LEFT
    GLFW_KEY_DOWN
    GLFW_KEY_UP
    GLFW_KEY_PAGE_UP
    GLFW_KEY_PAGE_DOWN
    GLFW_KEY_HOME
    GLFW_KEY_END
    GLFW_KEY_CAPS_LOCK
    GLFW_KEY_SCROLL_LOCK
    GLFW_KEY_NUM_LOCK
    GLFW_KEY_PRINT_SCREEN
    GLFW_KEY_PAUSE
    GLFW_KEY_F1
    GLFW_KEY_F2
    GLFW_KEY_F3
    GLFW_KEY_F4
    GLFW_KEY_F5
    GLFW_KEY_F6
    GLFW_KEY_F7
    GLFW_KEY_F8
    GLFW_KEY_F9
    GLFW_KEY_F10
    GLFW_KEY_F11
    GLFW_KEY_F12
    GLFW_KEY_F13
    GLFW_KEY_F14
    GLFW_KEY_F15
    GLFW_KEY_F16
    GLFW_KEY_F17
    GLFW_KEY_F18
    GLFW_KEY_F19
    GLFW_KEY_F20
    GLFW_KEY_F21
    GLFW_KEY_F22
    GLFW_KEY_F23
    GLFW_KEY_F24
    GLFW_KEY_F25
    GLFW_KEY_KP_0
    GLFW_KEY_KP_1
    GLFW_KEY_KP_2
    GLFW_KEY_KP_3
    GLFW_KEY_KP_4
    GLFW_KEY_KP_5
    GLFW_KEY_KP_6
    GLFW_KEY_KP_7
    GLFW_KEY_KP_8
    GLFW_KEY_KP_9
    GLFW_KEY_KP_DECIMAL
    GLFW_KEY_KP_DIVIDE
    GLFW_KEY_KP_MULTIPLY
    GLFW_KEY_KP_SUBTRACT
    GLFW_KEY_KP_ADD
    GLFW_KEY_KP_ENTER
    GLFW_KEY_KP_EQUAL
    GLFW_KEY_LEFT_SHIFT
    GLFW_KEY_LEFT_CONTROL
    GLFW_KEY_LEFT_ALT
    GLFW_KEY_LEFT_SUPER
    GLFW_KEY_RIGHT_SHIFT
    GLFW_KEY_RIGHT_CONTROL
    GLFW_KEY_RIGHT_ALT
    GLFW_KEY_RIGHT_SUPER
    GLFW_KEY_MENU
    GLFW_KEY_LAST
    GLFW_MOD_SHIFT
    GLFW_MOD_CONTROL
    GLFW_MOD_ALT
    GLFW_MOD_SUPER
    GLFW_MOD_CAPS_LOCK
    GLFW_MOD_NUM_LOCK
    GLFW_MOUSE_BUTTON_1
    GLFW_MOUSE_BUTTON_2
    GLFW_MOUSE_BUTTON_3
    GLFW_MOUSE_BUTTON_4
    GLFW_MOUSE_BUTTON_5
    GLFW_MOUSE_BUTTON_6
    GLFW_MOUSE_BUTTON_7
    GLFW_MOUSE_BUTTON_8
    GLFW_MOUSE_BUTTON_LAST
    GLFW_MOUSE_BUTTON_LEFT
    GLFW_MOUSE_BUTTON_RIGHT
    GLFW_MOUSE_BUTTON_MIDDLE
    GLFW_JOYSTICK_1
    GLFW_JOYSTICK_2
    GLFW_JOYSTICK_3
    GLFW_JOYSTICK_4
    GLFW_JOYSTICK_5
    GLFW_JOYSTICK_6
    GLFW_JOYSTICK_7
    GLFW_JOYSTICK_8
    GLFW_JOYSTICK_9
    GLFW_JOYSTICK_10
    GLFW_JOYSTICK_11
    GLFW_JOYSTICK_12
    GLFW_JOYSTICK_13
    GLFW_JOYSTICK_14
    GLFW_JOYSTICK_15
    GLFW_JOYSTICK_16
    GLFW_JOYSTICK_LAST
    GLFW_GAMEPAD_BUTTON_A
    GLFW_GAMEPAD_BUTTON_B
    GLFW_GAMEPAD_BUTTON_X
    GLFW_GAMEPAD_BUTTON_Y
    GLFW_GAMEPAD_BUTTON_LEFT_BUMPER
    GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER
    GLFW_GAMEPAD_BUTTON_BACK
    GLFW_GAMEPAD_BUTTON_START
    GLFW_GAMEPAD_BUTTON_GUIDE
    GLFW_GAMEPAD_BUTTON_LEFT_THUMB
    GLFW_GAMEPAD_BUTTON_RIGHT_THUMB
    GLFW_GAMEPAD_BUTTON_DPAD_UP
    GLFW_GAMEPAD_BUTTON_DPAD_RIGHT
    GLFW_GAMEPAD_BUTTON_DPAD_DOWN
    GLFW_GAMEPAD_BUTTON_DPAD_LEFT
    GLFW_GAMEPAD_BUTTON_LAST
    GLFW_GAMEPAD_BUTTON_CROSS
    GLFW_GAMEPAD_BUTTON_CIRCLE
    GLFW_GAMEPAD_BUTTON_SQUARE
    GLFW_GAMEPAD_BUTTON_TRIANGLE
    GLFW_GAMEPAD_AXIS_LEFT_X
    GLFW_GAMEPAD_AXIS_LEFT_Y
    GLFW_GAMEPAD_AXIS_RIGHT_X
    GLFW_GAMEPAD_AXIS_RIGHT_Y
    GLFW_GAMEPAD_AXIS_LEFT_TRIGGER
    GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
    GLFW_GAMEPAD_AXIS_LAST
    GLFW_NO_ERROR
    GLFW_NOT_INITIALIZED
    GLFW_NO_CURRENT_CONTEXT
    GLFW_INVALID_ENUM
    GLFW_INVALID_VALUE
    GLFW_OUT_OF_MEMORY
    GLFW_API_UNAVAILABLE
    GLFW_VERSION_UNAVAILABLE
    GLFW_PLATFORM_ERROR
    GLFW_FORMAT_UNAVAILABLE
    GLFW_NO_WINDOW_CONTEXT
    GLFW_FOCUSED
    GLFW_ICONIFIED
    GLFW_RESIZABLE
    GLFW_VISIBLE
    GLFW_DECORATED
    GLFW_AUTO_ICONIFY
    GLFW_FLOATING
    GLFW_MAXIMIZED
    GLFW_CENTER_CURSOR
    GLFW_TRANSPARENT_FRAMEBUFFER
    GLFW_HOVERED
    GLFW_FOCUS_ON_SHOW
    GLFW_RED_BITS
    GLFW_GREEN_BITS
    GLFW_BLUE_BITS
    GLFW_ALPHA_BITS
    GLFW_DEPTH_BITS
    GLFW_STENCIL_BITS
    GLFW_ACCUM_RED_BITS
    GLFW_ACCUM_GREEN_BITS
    GLFW_ACCUM_BLUE_BITS
    GLFW_ACCUM_ALPHA_BITS
    GLFW_AUX_BUFFERS
    GLFW_STEREO
    GLFW_SAMPLES
    GLFW_SRGB_CAPABLE
    GLFW_REFRESH_RATE
    GLFW_DOUBLEBUFFER
    GLFW_CLIENT_API
    GLFW_CONTEXT_VERSION_MAJOR
    GLFW_CONTEXT_VERSION_MINOR
    GLFW_CONTEXT_REVISION
    GLFW_CONTEXT_ROBUSTNESS
    GLFW_OPENGL_FORWARD_COMPAT
    GLFW_OPENGL_DEBUG_CONTEXT
    GLFW_OPENGL_PROFILE
    GLFW_CONTEXT_RELEASE_BEHAVIOR
    GLFW_CONTEXT_NO_ERROR
    GLFW_CONTEXT_CREATION_API
    GLFW_SCALE_TO_MONITOR
    GLFW_COCOA_RETINA_FRAMEBUFFER
    GLFW_COCOA_FRAME_NAME
    GLFW_COCOA_GRAPHICS_SWITCHING
    GLFW_X11_CLASS_NAME
    GLFW_X11_INSTANCE_NAME
    GLFW_NO_API
    GLFW_OPENGL_API
    GLFW_OPENGL_ES_API
    GLFW_NO_ROBUSTNESS
    GLFW_NO_RESET_NOTIFICATION
    GLFW_LOSE_CONTEXT_ON_RESET
    GLFW_OPENGL_ANY_PROFILE
    GLFW_OPENGL_CORE_PROFILE
    GLFW_OPENGL_COMPAT_PROFILE
    GLFW_CURSOR
    GLFW_STICKY_KEYS
    GLFW_STICKY_MOUSE_BUTTONS
    GLFW_LOCK_KEY_MODS
    GLFW_RAW_MOUSE_MOTION
    GLFW_CURSOR_NORMAL
    GLFW_CURSOR_HIDDEN
    GLFW_CURSOR_DISABLED
    GLFW_ANY_RELEASE_BEHAVIOR
    GLFW_RELEASE_BEHAVIOR_FLUSH
    GLFW_RELEASE_BEHAVIOR_NONE
    GLFW_NATIVE_CONTEXT_API
    GLFW_EGL_CONTEXT_API
    GLFW_OSMESA_CONTEXT_API
    GLFW_ARROW_CURSOR
    GLFW_IBEAM_CURSOR
    GLFW_CROSSHAIR_CURSOR
    GLFW_HAND_CURSOR
    GLFW_HRESIZE_CURSOR
    GLFW_VRESIZE_CURSOR
    GLFW_CONNECTED
    GLFW_DISCONNECTED
    GLFW_JOYSTICK_HAT_BUTTONS
    GLFW_COCOA_CHDIR_RESOURCES
    GLFW_COCOA_MENUBAR
    GLFW_DONT_CARE

    glfwInit
    glfwTerminate
    glfwInitHint
    glfwGetVersion
    glfwGetVersionString
    glfwGetError
    glfwSetErrorCallback
    glfwGetMonitors
    glfwGetPrimaryMonitor
    glfwGetMonitorPos
    glfwGetMonitorWorkarea
    glfwGetMonitorPhysicalSize
    glfwGetMonitorContentScale
    glfwGetMonitorName
    glfwSetMonitorUserPointer
    glfwGetMonitorUserPointer
    glfwSetMonitorCallback
    glfwGetVideoModes
    glfwGetVideoMode
    glfwSetGamma
    glfwGetGammaRamp
    glfwSetGammaRamp
    glfwDefaultWindowHints
    glfwWindowHint
    glfwWindowHintString
    glfwCreateWindow
    glfwDestroyWindow
    glfwWindowShouldClose
    glfwSetWindowShouldClose
    glfwSetWindowTitle
    glfwSetWindowIcon
    glfwGetWindowPos
    glfwSetWindowPos
    glfwGetWindowSize
    glfwSetWindowSizeLimits
    glfwSetWindowAspectRatio
    glfwSetWindowSize
    glfwGetFramebufferSize
    glfwGetWindowFrameSize
    glfwGetWindowContentScale
    glfwGetWindowOpacity
    glfwSetWindowOpacity
    glfwIconifyWindow
    glfwRestoreWindow
    glfwMaximizeWindow
    glfwShowWindow
    glfwHideWindow
    glfwFocusWindow
    glfwRequestWindowAttention
    glfwGetWindowMonitor
    glfwSetWindowMonitor
    glfwGetWindowAttrib
    glfwSetWindowAttrib
    glfwSetWindowUserPointer
    glfwGetWindowUserPointer
    glfwSetWindowPosCallback
    glfwSetWindowSizeCallback
    glfwSetWindowCloseCallback
    glfwSetWindowRefreshCallback
    glfwSetWindowFocusCallback
    glfwSetWindowIconifyCallback
    glfwSetWindowMaximizeCallback
    glfwSetFramebufferSizeCallback
    glfwSetWindowContentScaleCallback
    glfwPollEvents
    glfwWaitEvents
    glfwWaitEventsTimeout
    glfwPostEmptyEvent
    glfwGetInputMode
    glfwSetInputMode
    glfwRawMouseMotionSupported
    glfwGetKeyName
    glfwGetKeyScancode
    glfwGetKey
    glfwGetMouseButton
    glfwGetCursorPos
    glfwSetCursorPos
    glfwCreateCursor
    glfwCreateStandardCursor
    glfwDestroyCursor
    glfwSetCursor
    glfwSetKeyCallback
    glfwSetCharCallback
    glfwSetCharModsCallback
    glfwSetMouseButtonCallback
    glfwSetCursorPosCallback
    glfwSetCursorEnterCallback
    glfwSetScrollCallback
    glfwSetDropCallback
    glfwJoystickPresent
    glfwGetJoystickAxes
    glfwGetJoystickButtons
    glfwGetJoystickHats
    glfwGetJoystickName
    glfwGetJoystickGUID
    glfwSetJoystickUserPointer
    glfwGetJoystickUserPointer
    glfwJoystickIsGamepad
    glfwSetJoystickCallback
    glfwUpdateGamepadMappings
    glfwGetGamepadName
    glfwGetGamepadState
    glfwSetClipboardString
    glfwGetClipboardString
    glfwGetTime
    glfwSetTime
    glfwGetTimerValue
    glfwGetTimerFrequency
    glfwMakeContextCurrent
    glfwGetCurrentContext
    glfwSwapBuffers
    glfwSwapInterval
    glfwExtensionSupported
    glfwGetProcAddress
    glfwVulkanSupported
    glfwGetRequiredInstanceExtensions
    glfwGetInstanceProcAddress
    glfwGetPhysicalDevicePresentationSupport
    glfwCreateWindowSurface
  )
  (import
    (chezscheme))

  (define libglfw (load-shared-object "libs/glfw3.dll"))

  (define GLFW_VERSION_MAJOR 3)
  (define GLFW_VERSION_MINOR 3)
  (define GLFW_VERSION_REVISION 2)
  (define GLFW_TRUE 1)
  (define GLFW_FALSE 0)
  (define GLFW_RELEASE 0)
  (define GLFW_PRESS 1)
  (define GLFW_REPEAT 2)
  (define GLFW_HAT_CENTERED 0)
  (define GLFW_HAT_UP 1)
  (define GLFW_HAT_RIGHT 2)
  (define GLFW_HAT_DOWN 4)
  (define GLFW_HAT_LEFT 8)
  (define GLFW_HAT_RIGHT_UP #x03) ;;(GLFW_HAT_RIGHT | GLFW_HAT_UP))
  (define GLFW_HAT_RIGHT_DOWN #x06) ;;(GLFW_HAT_RIGHT | GLFW_HAT_DOWN))
  (define GLFW_HAT_LEFT_UP #x09) ;;(GLFW_HAT_LEFT  | GLFW_HAT_UP))
  (define GLFW_HAT_LEFT_DOWN #x0C) ;;(GLFW_HAT_LEFT  | GLFW_HAT_DOWN))
  (define GLFW_KEY_UNKNOWN -1)
  (define GLFW_KEY_SPACE 32)
  (define GLFW_KEY_APOSTROPHE 39  )
  (define GLFW_KEY_COMMA 44  )
  (define GLFW_KEY_MINUS 45  )
  (define GLFW_KEY_PERIOD 46  )
  (define GLFW_KEY_SLASH 47  )
  (define GLFW_KEY_0 48)
  (define GLFW_KEY_1 49)
  (define GLFW_KEY_2 50)
  (define GLFW_KEY_3 51)
  (define GLFW_KEY_4 52)
  (define GLFW_KEY_5 53)
  (define GLFW_KEY_6 54)
  (define GLFW_KEY_7 55)
  (define GLFW_KEY_8 56)
  (define GLFW_KEY_9 57)
  (define GLFW_KEY_SEMICOLON 59  )
  (define GLFW_KEY_EQUAL 61  )
  (define GLFW_KEY_A 65)
  (define GLFW_KEY_B 66)
  (define GLFW_KEY_C 67)
  (define GLFW_KEY_D 68)
  (define GLFW_KEY_E 69)
  (define GLFW_KEY_F 70)
  (define GLFW_KEY_G 71)
  (define GLFW_KEY_H 72)
  (define GLFW_KEY_I 73)
  (define GLFW_KEY_J 74)
  (define GLFW_KEY_K 75)
  (define GLFW_KEY_L 76)
  (define GLFW_KEY_M 77)
  (define GLFW_KEY_N 78)
  (define GLFW_KEY_O 79)
  (define GLFW_KEY_P 80)
  (define GLFW_KEY_Q 81)
  (define GLFW_KEY_R 82)
  (define GLFW_KEY_S 83)
  (define GLFW_KEY_T 84)
  (define GLFW_KEY_U 85)
  (define GLFW_KEY_V 86)
  (define GLFW_KEY_W 87)
  (define GLFW_KEY_X 88)
  (define GLFW_KEY_Y 89)
  (define GLFW_KEY_Z 90)
  (define GLFW_KEY_LEFT_BRACKET 91  )
  (define GLFW_KEY_BACKSLASH 92  )
  (define GLFW_KEY_RIGHT_BRACKET 93  )
  (define GLFW_KEY_GRAVE_ACCENT 96  )
  (define GLFW_KEY_WORLD_1 161 )
  (define GLFW_KEY_WORLD_2 162 )
  (define GLFW_KEY_ESCAPE 256)
  (define GLFW_KEY_ENTER 257)
  (define GLFW_KEY_TAB 258)
  (define GLFW_KEY_BACKSPACE 259)
  (define GLFW_KEY_INSERT 260)
  (define GLFW_KEY_DELETE 261)
  (define GLFW_KEY_RIGHT 262)
  (define GLFW_KEY_LEFT 263)
  (define GLFW_KEY_DOWN 264)
  (define GLFW_KEY_UP 265)
  (define GLFW_KEY_PAGE_UP 266)
  (define GLFW_KEY_PAGE_DOWN 267)
  (define GLFW_KEY_HOME 268)
  (define GLFW_KEY_END 269)
  (define GLFW_KEY_CAPS_LOCK 280)
  (define GLFW_KEY_SCROLL_LOCK 281)
  (define GLFW_KEY_NUM_LOCK 282)
  (define GLFW_KEY_PRINT_SCREEN 283)
  (define GLFW_KEY_PAUSE 284)
  (define GLFW_KEY_F1 290)
  (define GLFW_KEY_F2 291)
  (define GLFW_KEY_F3 292)
  (define GLFW_KEY_F4 293)
  (define GLFW_KEY_F5 294)
  (define GLFW_KEY_F6 295)
  (define GLFW_KEY_F7 296)
  (define GLFW_KEY_F8 297)
  (define GLFW_KEY_F9 298)
  (define GLFW_KEY_F10 299)
  (define GLFW_KEY_F11 300)
  (define GLFW_KEY_F12 301)
  (define GLFW_KEY_F13 302)
  (define GLFW_KEY_F14 303)
  (define GLFW_KEY_F15 304)
  (define GLFW_KEY_F16 305)
  (define GLFW_KEY_F17 306)
  (define GLFW_KEY_F18 307)
  (define GLFW_KEY_F19 308)
  (define GLFW_KEY_F20 309)
  (define GLFW_KEY_F21 310)
  (define GLFW_KEY_F22 311)
  (define GLFW_KEY_F23 312)
  (define GLFW_KEY_F24 313)
  (define GLFW_KEY_F25 314)
  (define GLFW_KEY_KP_0 320)
  (define GLFW_KEY_KP_1 321)
  (define GLFW_KEY_KP_2 322)
  (define GLFW_KEY_KP_3 323)
  (define GLFW_KEY_KP_4 324)
  (define GLFW_KEY_KP_5 325)
  (define GLFW_KEY_KP_6 326)
  (define GLFW_KEY_KP_7 327)
  (define GLFW_KEY_KP_8 328)
  (define GLFW_KEY_KP_9 329)
  (define GLFW_KEY_KP_DECIMAL 330)
  (define GLFW_KEY_KP_DIVIDE 331)
  (define GLFW_KEY_KP_MULTIPLY 332)
  (define GLFW_KEY_KP_SUBTRACT 333)
  (define GLFW_KEY_KP_ADD 334)
  (define GLFW_KEY_KP_ENTER 335)
  (define GLFW_KEY_KP_EQUAL 336)
  (define GLFW_KEY_LEFT_SHIFT 340)
  (define GLFW_KEY_LEFT_CONTROL 341)
  (define GLFW_KEY_LEFT_ALT 342)
  (define GLFW_KEY_LEFT_SUPER 343)
  (define GLFW_KEY_RIGHT_SHIFT 344)
  (define GLFW_KEY_RIGHT_CONTROL 345)
  (define GLFW_KEY_RIGHT_ALT 346)
  (define GLFW_KEY_RIGHT_SUPER 347)
  (define GLFW_KEY_MENU 348)
  (define GLFW_KEY_LAST GLFW_KEY_MENU)
  (define GLFW_MOD_SHIFT #x0001)
  (define GLFW_MOD_CONTROL #x0002)
  (define GLFW_MOD_ALT #x0004)
  (define GLFW_MOD_SUPER #x0008)
  (define GLFW_MOD_CAPS_LOCK #x0010)
  (define GLFW_MOD_NUM_LOCK #x0020)
  (define GLFW_MOUSE_BUTTON_1 0)
  (define GLFW_MOUSE_BUTTON_2 1)
  (define GLFW_MOUSE_BUTTON_3 2)
  (define GLFW_MOUSE_BUTTON_4 3)
  (define GLFW_MOUSE_BUTTON_5 4)
  (define GLFW_MOUSE_BUTTON_6 5)
  (define GLFW_MOUSE_BUTTON_7 6)
  (define GLFW_MOUSE_BUTTON_8 7)
  (define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8)
  (define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1)
  (define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2)
  (define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3)
  (define GLFW_JOYSTICK_1 0)
  (define GLFW_JOYSTICK_2 1)
  (define GLFW_JOYSTICK_3 2)
  (define GLFW_JOYSTICK_4 3)
  (define GLFW_JOYSTICK_5 4)
  (define GLFW_JOYSTICK_6 5)
  (define GLFW_JOYSTICK_7 6)
  (define GLFW_JOYSTICK_8 7)
  (define GLFW_JOYSTICK_9 8)
  (define GLFW_JOYSTICK_10 9)
  (define GLFW_JOYSTICK_11 10)
  (define GLFW_JOYSTICK_12 11)
  (define GLFW_JOYSTICK_13 12)
  (define GLFW_JOYSTICK_14 13)
  (define GLFW_JOYSTICK_15 14)
  (define GLFW_JOYSTICK_16 15)
  (define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16)
  (define GLFW_GAMEPAD_BUTTON_A 0)
  (define GLFW_GAMEPAD_BUTTON_B 1)
  (define GLFW_GAMEPAD_BUTTON_X 2)
  (define GLFW_GAMEPAD_BUTTON_Y 3)
  (define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4)
  (define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5)
  (define GLFW_GAMEPAD_BUTTON_BACK 6)
  (define GLFW_GAMEPAD_BUTTON_START 7)
  (define GLFW_GAMEPAD_BUTTON_GUIDE 8)
  (define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9)
  (define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10)
  (define GLFW_GAMEPAD_BUTTON_DPAD_UP 11)
  (define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12)
  (define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13)
  (define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14)
  (define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT)
  (define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A)
  (define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B)
  (define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X)
  (define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y)
  (define GLFW_GAMEPAD_AXIS_LEFT_X 0)
  (define GLFW_GAMEPAD_AXIS_LEFT_Y 1)
  (define GLFW_GAMEPAD_AXIS_RIGHT_X 2)
  (define GLFW_GAMEPAD_AXIS_RIGHT_Y 3)
  (define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4)
  (define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5)
  (define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER)
  (define GLFW_NO_ERROR 0)
  (define GLFW_NOT_INITIALIZED #x00010001)
  (define GLFW_NO_CURRENT_CONTEXT #x00010002)
  (define GLFW_INVALID_ENUM #x00010003)
  (define GLFW_INVALID_VALUE #x00010004)
  (define GLFW_OUT_OF_MEMORY #x00010005)
  (define GLFW_API_UNAVAILABLE #x00010006)
  (define GLFW_VERSION_UNAVAILABLE #x00010007)
  (define GLFW_PLATFORM_ERROR #x00010008)
  (define GLFW_FORMAT_UNAVAILABLE #x00010009)
  (define GLFW_NO_WINDOW_CONTEXT #x0001000A)
  (define GLFW_FOCUSED #x00020001)
  (define GLFW_ICONIFIED #x00020002)
  (define GLFW_RESIZABLE #x00020003)
  (define GLFW_VISIBLE #x00020004)
  (define GLFW_DECORATED #x00020005)
  (define GLFW_AUTO_ICONIFY #x00020006)
  (define GLFW_FLOATING #x00020007)
  (define GLFW_MAXIMIZED #x00020008)
  (define GLFW_CENTER_CURSOR #x00020009)
  (define GLFW_TRANSPARENT_FRAMEBUFFER #x0002000A)
  (define GLFW_HOVERED #x0002000B)
  (define GLFW_FOCUS_ON_SHOW #x0002000C)
  (define GLFW_RED_BITS #x00021001)
  (define GLFW_GREEN_BITS #x00021002)
  (define GLFW_BLUE_BITS #x00021003)
  (define GLFW_ALPHA_BITS #x00021004)
  (define GLFW_DEPTH_BITS #x00021005)
  (define GLFW_STENCIL_BITS #x00021006)
  (define GLFW_ACCUM_RED_BITS #x00021007)
  (define GLFW_ACCUM_GREEN_BITS #x00021008)
  (define GLFW_ACCUM_BLUE_BITS #x00021009)
  (define GLFW_ACCUM_ALPHA_BITS #x0002100A)
  (define GLFW_AUX_BUFFERS #x0002100B)
  (define GLFW_STEREO #x0002100C)
  (define GLFW_SAMPLES #x0002100D)
  (define GLFW_SRGB_CAPABLE #x0002100E)
  (define GLFW_REFRESH_RATE #x0002100F)
  (define GLFW_DOUBLEBUFFER #x00021010)
  (define GLFW_CLIENT_API #x00022001)
  (define GLFW_CONTEXT_VERSION_MAJOR #x00022002)
  (define GLFW_CONTEXT_VERSION_MINOR #x00022003)
  (define GLFW_CONTEXT_REVISION #x00022004)
  (define GLFW_CONTEXT_ROBUSTNESS #x00022005)
  (define GLFW_OPENGL_FORWARD_COMPAT #x00022006)
  (define GLFW_OPENGL_DEBUG_CONTEXT #x00022007)
  (define GLFW_OPENGL_PROFILE #x00022008)
  (define GLFW_CONTEXT_RELEASE_BEHAVIOR #x00022009)
  (define GLFW_CONTEXT_NO_ERROR #x0002200A)
  (define GLFW_CONTEXT_CREATION_API #x0002200B)
  (define GLFW_SCALE_TO_MONITOR #x0002200C)
  (define GLFW_COCOA_RETINA_FRAMEBUFFER #x00023001)
  (define GLFW_COCOA_FRAME_NAME #x00023002)
  (define GLFW_COCOA_GRAPHICS_SWITCHING #x00023003)
  (define GLFW_X11_CLASS_NAME #x00024001)
  (define GLFW_X11_INSTANCE_NAME #x00024002)
  (define GLFW_NO_API 0)
  (define GLFW_OPENGL_API #x00030001)
  (define GLFW_OPENGL_ES_API #x00030002)
  (define GLFW_NO_ROBUSTNESS 0)
  (define GLFW_NO_RESET_NOTIFICATION #x00031001)
  (define GLFW_LOSE_CONTEXT_ON_RESET #x00031002)
  (define GLFW_OPENGL_ANY_PROFILE 0)
  (define GLFW_OPENGL_CORE_PROFILE #x00032001)
  (define GLFW_OPENGL_COMPAT_PROFILE #x00032002)
  (define GLFW_CURSOR #x00033001)
  (define GLFW_STICKY_KEYS #x00033002)
  (define GLFW_STICKY_MOUSE_BUTTONS #x00033003)
  (define GLFW_LOCK_KEY_MODS #x00033004)
  (define GLFW_RAW_MOUSE_MOTION #x00033005)
  (define GLFW_CURSOR_NORMAL #x00034001)
  (define GLFW_CURSOR_HIDDEN #x00034002)
  (define GLFW_CURSOR_DISABLED #x00034003)
  (define GLFW_ANY_RELEASE_BEHAVIOR 0)
  (define GLFW_RELEASE_BEHAVIOR_FLUSH #x00035001)
  (define GLFW_RELEASE_BEHAVIOR_NONE #x00035002)
  (define GLFW_NATIVE_CONTEXT_API #x00036001)
  (define GLFW_EGL_CONTEXT_API #x00036002)
  (define GLFW_OSMESA_CONTEXT_API #x00036003)
  (define GLFW_ARROW_CURSOR #x00036001)
  (define GLFW_IBEAM_CURSOR #x00036002)
  (define GLFW_CROSSHAIR_CURSOR #x00036003)
  (define GLFW_HAND_CURSOR #x00036004)
  (define GLFW_HRESIZE_CURSOR #x00036005)
  (define GLFW_VRESIZE_CURSOR #x00036006)
  (define GLFW_CONNECTED #x00040001)
  (define GLFW_DISCONNECTED #x00040002)
  (define GLFW_JOYSTICK_HAT_BUTTONS #x00050001)
  (define GLFW_COCOA_CHDIR_RESOURCES #x00051001)
  (define GLFW_COCOA_MENUBAR #x00051002)
  (define GLFW_DONT_CARE -1)

  (define glfwInit (foreign-procedure __stdcall "glfwInit" () int))
  (define glfwTerminate (foreign-procedure __stdcall "glfwTerminate" () void))
  (define glfwInitHint (foreign-procedure __stdcall "glfwInitHint" (int int) void))
  (define glfwGetVersion (foreign-procedure __stdcall "glfwGetVersion" ((* int) (* int) (* int)) void))
  (define glfwGetVersionString (foreign-procedure __stdcall "glfwGetVersionString" () string))
  (define glfwGetError (foreign-procedure __stdcall "glfwGetError" (uptr) int))
  (define glfwSetErrorCallback (foreign-procedure __stdcall "glfwSetErrorCallback" (uptr) uptr))
  (define glfwGetMonitors (foreign-procedure __stdcall "glfwGetMonitors" ((* int)) uptr))
  (define glfwGetPrimaryMonitor (foreign-procedure __stdcall "glfwGetPrimaryMonitor" () uptr))
  (define glfwGetMonitorPos (foreign-procedure __stdcall "glfwGetMonitorPos" (uptr (* int) (* int)) void))
  (define glfwGetMonitorWorkarea (foreign-procedure __stdcall "glfwGetMonitorWorkarea" (uptr (* int) (* int) (* int) (* int)) void))
  (define glfwGetMonitorPhysicalSize (foreign-procedure __stdcall "glfwGetMonitorPhysicalSize" (uptr (* int) (* int)) void))
  (define glfwGetMonitorContentScale (foreign-procedure __stdcall "glfwGetMonitorContentScale" (uptr (* float) (* float)) void))
  (define glfwGetMonitorName (foreign-procedure __stdcall "glfwGetMonitorName" (uptr) string))
  (define glfwSetMonitorUserPointer (foreign-procedure __stdcall "glfwSetMonitorUserPointer" (uptr void*) void))
  (define glfwGetMonitorUserPointer (foreign-procedure __stdcall "glfwGetMonitorUserPointer" (uptr) void*))
  (define glfwSetMonitorCallback (foreign-procedure __stdcall "glfwSetMonitorCallback" (uptr) uptr))
  (define glfwGetVideoModes (foreign-procedure __stdcall "glfwGetVideoModes" (uptr (* int)) uptr))
  (define glfwGetVideoMode (foreign-procedure __stdcall "glfwGetVideoMode" (uptr) uptr))
  (define glfwSetGamma (foreign-procedure __stdcall "glfwSetGamma" (uptr float) void))
  (define glfwGetGammaRamp (foreign-procedure __stdcall "glfwGetGammaRamp" (uptr) uptr))
  (define glfwSetGammaRamp (foreign-procedure __stdcall "glfwSetGammaRamp" (uptr uptr) void))
  (define glfwDefaultWindowHints (foreign-procedure __stdcall "glfwDefaultWindowHints" () void))
  (define glfwWindowHint (foreign-procedure __stdcall "glfwWindowHint" (int int) void))
  (define glfwWindowHintString (foreign-procedure __stdcall "glfwWindowHintString" (int string) void))
  (define glfwCreateWindow (foreign-procedure __stdcall "glfwCreateWindow" (int int string uptr uptr) uptr))
  (define glfwDestroyWindow (foreign-procedure __stdcall "glfwDestroyWindow" (uptr) void))
  (define glfwWindowShouldClose (foreign-procedure __stdcall "glfwWindowShouldClose" (uptr) int))
  (define glfwSetWindowShouldClose (foreign-procedure __stdcall "glfwSetWindowShouldClose" (uptr int) void))
  (define glfwSetWindowTitle (foreign-procedure __stdcall "glfwSetWindowTitle" (uptr string) void))
  (define glfwSetWindowIcon (foreign-procedure __stdcall "glfwSetWindowIcon" (uptr int uptr) void))
  (define glfwGetWindowPos (foreign-procedure __stdcall "glfwGetWindowPos" (uptr (* int) (* int)) void))
  (define glfwSetWindowPos (foreign-procedure __stdcall "glfwSetWindowPos" (uptr int int) void))
  (define glfwGetWindowSize (foreign-procedure __stdcall "glfwGetWindowSize" (uptr (* int) (* int)) void))
  (define glfwSetWindowSizeLimits (foreign-procedure __stdcall "glfwSetWindowSizeLimits" (uptr int int int int) void))
  (define glfwSetWindowAspectRatio (foreign-procedure __stdcall "glfwSetWindowAspectRatio" (uptr int int) void))
  (define glfwSetWindowSize (foreign-procedure __stdcall "glfwSetWindowSize" (uptr int int) void))
  (define glfwGetFramebufferSize (foreign-procedure __stdcall "glfwGetFramebufferSize" (uptr (* int) (* int)) void))
  (define glfwGetWindowFrameSize (foreign-procedure __stdcall "glfwGetWindowFrameSize" (uptr (* int) (* int) (* int) (* int)) void))
  (define glfwGetWindowContentScale (foreign-procedure __stdcall "glfwGetWindowContentScale" (uptr (* float) (* float)) void))
  (define glfwGetWindowOpacity (foreign-procedure __stdcall "glfwGetWindowOpacity" (uptr) float))
  (define glfwSetWindowOpacity (foreign-procedure __stdcall "glfwSetWindowOpacity" (uptr float) void))
  (define glfwIconifyWindow (foreign-procedure __stdcall "glfwIconifyWindow" (uptr) void))
  (define glfwRestoreWindow (foreign-procedure __stdcall "glfwRestoreWindow" (uptr) void))
  (define glfwMaximizeWindow (foreign-procedure __stdcall "glfwMaximizeWindow" (uptr) void))
  (define glfwShowWindow (foreign-procedure __stdcall "glfwShowWindow" (uptr) void))
  (define glfwHideWindow (foreign-procedure __stdcall "glfwHideWindow" (uptr) void))
  (define glfwFocusWindow (foreign-procedure __stdcall "glfwFocusWindow" (uptr) void))
  (define glfwRequestWindowAttention (foreign-procedure __stdcall "glfwRequestWindowAttention" (uptr) void))
  (define glfwGetWindowMonitor (foreign-procedure __stdcall "glfwGetWindowMonitor" (uptr) uptr))
  (define glfwSetWindowMonitor (foreign-procedure __stdcall "glfwSetWindowMonitor" (uptr uptr int int int int int) void))
  (define glfwGetWindowAttrib (foreign-procedure __stdcall "glfwGetWindowAttrib" (uptr int) int))
  (define glfwSetWindowAttrib (foreign-procedure __stdcall "glfwSetWindowAttrib" (uptr int int) void))
  (define glfwSetWindowUserPointer (foreign-procedure __stdcall "glfwSetWindowUserPointer" (uptr void*) void))
  (define glfwGetWindowUserPointer (foreign-procedure __stdcall "glfwGetWindowUserPointer" (uptr) void*))
  (define glfwSetWindowPosCallback (foreign-procedure __stdcall "glfwSetWindowPosCallback" (uptr uptr) uptr))
  (define glfwSetWindowSizeCallback (foreign-procedure __stdcall "glfwSetWindowSizeCallback" (uptr uptr) uptr))
  (define glfwSetWindowCloseCallback (foreign-procedure __stdcall "glfwSetWindowCloseCallback" (uptr uptr) uptr))
  (define glfwSetWindowRefreshCallback (foreign-procedure __stdcall "glfwSetWindowRefreshCallback" (uptr uptr) uptr))
  (define glfwSetWindowFocusCallback (foreign-procedure __stdcall "glfwSetWindowFocusCallback" (uptr uptr) uptr))
  (define glfwSetWindowIconifyCallback (foreign-procedure __stdcall "glfwSetWindowIconifyCallback" (uptr uptr) uptr))
  (define glfwSetWindowMaximizeCallback (foreign-procedure __stdcall "glfwSetWindowMaximizeCallback" (uptr uptr) uptr))
  (define glfwSetFramebufferSizeCallback (foreign-procedure __stdcall "glfwSetFramebufferSizeCallback" (uptr uptr) uptr))
  (define glfwSetWindowContentScaleCallback (foreign-procedure __stdcall "glfwSetWindowContentScaleCallback" (uptr uptr) uptr))
  (define glfwPollEvents (foreign-procedure __stdcall "glfwPollEvents" () void))
  (define glfwWaitEvents (foreign-procedure __stdcall "glfwWaitEvents" () void))
  (define glfwWaitEventsTimeout (foreign-procedure __stdcall "glfwWaitEventsTimeout" (double) void))
  (define glfwPostEmptyEvent (foreign-procedure __stdcall "glfwPostEmptyEvent" () void))
  (define glfwGetInputMode (foreign-procedure __stdcall "glfwGetInputMode" (uptr int) int))
  (define glfwSetInputMode (foreign-procedure __stdcall "glfwSetInputMode" (uptr int int) void))
  (define glfwRawMouseMotionSupported (foreign-procedure __stdcall "glfwRawMouseMotionSupported" () int))
  (define glfwGetKeyName (foreign-procedure __stdcall "glfwGetKeyName" (int int) string))
  (define glfwGetKeyScancode (foreign-procedure __stdcall "glfwGetKeyScancode" (int) int))
  (define glfwGetKey (foreign-procedure __stdcall "glfwGetKey" (uptr int) int))
  (define glfwGetMouseButton (foreign-procedure __stdcall "glfwGetMouseButton" (uptr int) int))
  (define glfwGetCursorPos (foreign-procedure __stdcall "glfwGetCursorPos" (uptr (* double) (* double)) void))
  (define glfwSetCursorPos (foreign-procedure __stdcall "glfwSetCursorPos" (uptr double double) void))
  (define glfwCreateCursor (foreign-procedure __stdcall "glfwCreateCursor" (uptr int int) uptr))
  (define glfwCreateStandardCursor (foreign-procedure __stdcall "glfwCreateStandardCursor" (int) uptr))
  (define glfwDestroyCursor (foreign-procedure __stdcall "glfwDestroyCursor" (uptr) void))
  (define glfwSetCursor (foreign-procedure __stdcall "glfwSetCursor" (uptr uptr) void))
  (define glfwSetKeyCallback (foreign-procedure __stdcall "glfwSetKeyCallback" (uptr uptr) uptr))
  (define glfwSetCharCallback (foreign-procedure __stdcall "glfwSetCharCallback" (uptr uptr) uptr))
  (define glfwSetCharModsCallback (foreign-procedure __stdcall "glfwSetCharModsCallback" (uptr uptr) uptr))
  (define glfwSetMouseButtonCallback (foreign-procedure __stdcall "glfwSetMouseButtonCallback" (uptr uptr) uptr))
  (define glfwSetCursorPosCallback (foreign-procedure __stdcall "glfwSetCursorPosCallback" (uptr uptr) uptr))
  (define glfwSetCursorEnterCallback (foreign-procedure __stdcall "glfwSetCursorEnterCallback" (uptr uptr) uptr))
  (define glfwSetScrollCallback (foreign-procedure __stdcall "glfwSetScrollCallback" (uptr uptr) uptr))
  (define glfwSetDropCallback (foreign-procedure __stdcall "glfwSetDropCallback" (uptr uptr) uptr))
  (define glfwJoystickPresent (foreign-procedure __stdcall "glfwJoystickPresent" (int) int))
  (define glfwGetJoystickAxes (foreign-procedure __stdcall "glfwGetJoystickAxes" (int (* int)) (* float)))
  (define glfwGetJoystickButtons (foreign-procedure __stdcall "glfwGetJoystickButtons" (int (* int)) string))
  (define glfwGetJoystickHats (foreign-procedure __stdcall "glfwGetJoystickHats" (int (* int)) string))
  (define glfwGetJoystickName (foreign-procedure __stdcall "glfwGetJoystickName" (int) string))
  (define glfwGetJoystickGUID (foreign-procedure __stdcall "glfwGetJoystickGUID" (int) string))
  (define glfwSetJoystickUserPointer (foreign-procedure __stdcall "glfwSetJoystickUserPointer" (int void*) void))
  (define glfwGetJoystickUserPointer (foreign-procedure __stdcall "glfwGetJoystickUserPointer" (int) void*))
  (define glfwJoystickIsGamepad (foreign-procedure __stdcall "glfwJoystickIsGamepad" (int) int))
  (define glfwSetJoystickCallback (foreign-procedure __stdcall "glfwSetJoystickCallback" (uptr) uptr))
  (define glfwUpdateGamepadMappings (foreign-procedure __stdcall "glfwUpdateGamepadMappings" (string) int))
  (define glfwGetGamepadName (foreign-procedure __stdcall "glfwGetGamepadName" (int) string))
  (define glfwGetGamepadState (foreign-procedure __stdcall "glfwGetGamepadState" (int uptr) int))
  (define glfwSetClipboardString (foreign-procedure __stdcall "glfwSetClipboardString" (uptr string) void))
  (define glfwGetClipboardString (foreign-procedure __stdcall "glfwGetClipboardString" (uptr) string))
  (define glfwGetTime (foreign-procedure __stdcall "glfwGetTime" () double))
  (define glfwSetTime (foreign-procedure __stdcall "glfwSetTime" (double) void))
  (define glfwGetTimerValue (foreign-procedure __stdcall "glfwGetTimerValue" () unsigned-64))
  (define glfwGetTimerFrequency (foreign-procedure __stdcall "glfwGetTimerFrequency" () unsigned-64))
  (define glfwMakeContextCurrent (foreign-procedure __stdcall "glfwMakeContextCurrent" (uptr) void))
  (define glfwGetCurrentContext (foreign-procedure __stdcall "glfwGetCurrentContext" () uptr))
  (define glfwSwapBuffers (foreign-procedure __stdcall "glfwSwapBuffers" (uptr) void))
  (define glfwSwapInterval (foreign-procedure __stdcall "glfwSwapInterval" (int) void))
  (define glfwExtensionSupported (foreign-procedure __stdcall "glfwExtensionSupported" (string) int))
  (define glfwGetProcAddress (foreign-procedure __stdcall "glfwGetProcAddress" (string) uptr))
  (define glfwVulkanSupported (foreign-procedure __stdcall "glfwVulkanSupported" () int))
  (define glfwGetRequiredInstanceExtensions (foreign-procedure __stdcall "glfwGetRequiredInstanceExtensions" ((* unsigned-32)) uptr))
  (define glfwGetInstanceProcAddress (foreign-procedure __stdcall "glfwGetInstanceProcAddress" (uptr string) uptr))
  (define glfwGetPhysicalDevicePresentationSupport (foreign-procedure __stdcall "glfwGetPhysicalDevicePresentationSupport" (uptr uptr unsigned-32) int))
  (define glfwCreateWindowSurface (foreign-procedure __stdcall "glfwCreateWindowSurface" (uptr uptr uptr uptr) uptr))
)
